<template>
    <div>
        <div>
            <van-nav-bar title="资产盘亏" @click-left="onClickLeft" left-arrow />
        </div>
        <div style="width: 95vw; margin: 10px auto;">
            <card mode="pk" ref="cardref" :cardList="cardList" :Objapi="Objapi"></card>
        </div>
    </div>
</template>

<script>
import card from './components/card.vue';
import backMixin from '../../mixins/backMixin'
export default {
    mixins: [backMixin],
    components: {
        card,
    },
    data() {
        return {
            form: {},
            Objapi:this.$api.getreStocktaking, //盘亏
            cardList: [
                {
                    name: '盘亏说明',
                    value: 'remark',
                    key: 'pksm',
                    icon: ''
                }, {
                    name: '相关附件',
                    value: '',
                    key: 'xgfj',
                    icon: ''
                },
            ]

        } 
    },
    mounted() {
        this.form = JSON.parse(decodeURIComponent(this.$route.params.data))
        console.log(this.form,'form')
        this.$nextTick(() => {
            this.$refs.cardref.setformdata(this.form)
        })
    },
    methods: {
        onClickLeft() {
            this.$router.back()
        }
    }
}
</script>

<style scoped></style>